Problem Note 54603: The %SCAN macro function might insert an extra space when generating a string
An extra space might be incorrectly inserted when building a string by appending the result of the %SCAN macro function. This might result in various errors or warnings in the SAS® log.
The following illustrates the problem:
This might generate an incorrect result of new_ value. Notice the space between the underscore and the %SCAN result.
A possible workaround for this problem is to include the %UNQUOTE macro function around the entire string. For example:
%unquote(new_%scan(&var,&i))
Operating System and Release Information
SAS System | Base SAS | z/OS 64-bit | 9.3 TS1M0 | 9.4 TS1M4 |
Microsoft® Windows® for x64 | 9.3 TS1M0 | 9.4 TS1M4 |
Microsoft Windows Server 2003 Datacenter Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.3 TS1M0 | |
Microsoft Windows Server 2003 for x64 | 9.3 TS1M0 | |
Microsoft Windows Server 2008 | 9.3 TS1M0 | 9.4 TS1M4 |
Microsoft Windows Server 2008 R2 | 9.3 TS1M0 | 9.4 TS1M4 |
Microsoft Windows Server 2008 for x64 | 9.3 TS1M0 | 9.4 TS1M4 |
Microsoft Windows XP Professional | 9.3 TS1M0 | |
Windows 7 Enterprise 32 bit | 9.3 TS1M0 | 9.4 TS1M4 |
Windows 7 Enterprise x64 | 9.3 TS1M0 | 9.4 TS1M4 |
Windows 7 Home Premium 32 bit | 9.3 TS1M0 | 9.4 TS1M4 |
Windows 7 Home Premium x64 | 9.3 TS1M0 | 9.4 TS1M4 |
Windows 7 Professional 32 bit | 9.3 TS1M0 | 9.4 TS1M4 |
Windows 7 Professional x64 | 9.3 TS1M0 | 9.4 TS1M4 |
Windows 7 Ultimate 32 bit | 9.3 TS1M0 | 9.4 TS1M4 |
Windows 7 Ultimate x64 | 9.3 TS1M0 | 9.4 TS1M4 |
Windows Vista | 9.3 TS1M0 | |
Windows Vista for x64 | 9.3 TS1M0 | |
64-bit Enabled AIX | 9.3 TS1M0 | 9.4 TS1M4 |
64-bit Enabled HP-UX | 9.3 TS1M0 | 9.4 TS1M4 |
64-bit Enabled Solaris | 9.3 TS1M0 | 9.4 TS1M4 |
HP-UX IPF | 9.3 TS1M0 | 9.4 TS1M4 |
Linux | 9.3 TS1M0 | 9.4 TS1M4 |
Linux for x64 | 9.3 TS1M0 | 9.4 TS1M4 |
Solaris for x64 | 9.3 TS1M0 | 9.4 TS1M4 |
z/OS | 9.3 TS1M0 | 9.4 TS1M4 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
When building a string where part of the string uses the %SCAN macro function, an extra space might be inserted into the string.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2020-03-25 11:38:15 |
Date Created: | 2014-11-12 10:50:30 |